
<template>
    <div class="index_box">
        <div class="header">
            <img src="../assets/image/index_bg.png" class="index_bg">
            <mu-container class="index_con" fluid>
                <div class="index_top">
                    <mu-row>
                        <mu-col span="10" sm="8" md="8" lg="5">
                            <mu-row>
                                <mu-col span="2" sm="2" md="2" lg="2">
                                    <router-link :to="{ path: '/Light'}"  class="nav_link">
                                        <img src="../assets/image/index_light.png">
                                        <span>智能照明</span>
                                    </router-link>
                                </mu-col>
                                <mu-col span="2" sm="2" md="2" lg="2">
                                    <router-link :to="{ path: '/Air'}">
                                        <img src="../assets/image/index_kt.png">
                                        <span>空调</span>
                                    </router-link>
                                </mu-col>
                                <mu-col span="2" sm="2" md="2" lg="2">
                                    <router-link :to="{ path: '/Work'}">
                                        <img src="../assets/image/index_plan.png">
                                        <span>工作模式</span>
                                    </router-link>
                                </mu-col>
                                <mu-col span="2" sm="2" md="2" lg="2">
                                    <router-link :to="{ path: '/Indoor'}">
                                        <img src="../assets/image/index_indoor.png">
                                        <span>室内环境</span>
                                    </router-link>
                                </mu-col>
                                <mu-col span="2" sm="2" md="2" lg="2">
                                    <router-link :to="{ path: '/Energy'}">
                                        <img src="../assets/image/index_energy.png">
                                        <span>能耗管理</span>
                                    </router-link>
                                </mu-col>
                                <mu-col span="2" sm="2" md="2" lg="2">
                                    <router-link :to="{ path: '/Danger'}">
                                        <img src="../assets/image/index_dange.png">
                                        <span>报警信息</span>
                                    </router-link>
                                </mu-col>
                            </mu-row>
                        </mu-col>
                        <mu-col span="2" sm="4" md="4" lg="7">
                            <mu-row>
                                <mu-col span="2" sm="4" md="4" lg="2">
                                    <router-link :to="{ path: '/Message'}"  class="nav_link">
                                        <img src="../assets/image/index_hy.png">
                                        <span>会议信息</span>
                                    </router-link>
                                </mu-col>
                            </mu-row>
                        </mu-col>
                    </mu-row>
                </div>
            </mu-container>
        </div>
        <div class="content_index">
            <img src="../assets/image/index_middle_bg.png" class="middle_content_bg">
            <mu-container class="index_middile_con" fluid style="">
                <mu-row gutter>
                    <mu-col span="3" sm="3" md="4" lg="3" class="list_same">
                        <mu-row>
                            <mu-col span="6" sm="6" md="6" lg="6">
                                <mu-row>
                                    <mu-col span="12" sm="12" md="12" lg="12" class="dd-mt-10" @click="light_one()">
                                        <span>照明1</span>
                                        <mu-switch class="switch_list" color="#00d0ff" v-model="switchVal.value1"></mu-switch>
                                    </mu-col>
                                    <mu-col span="12" sm="12" md="12" lg="12" class="dd-mt-10" @click="light_two()">
                                        <span>照明2</span>
                                        <mu-switch class="switch_list" color="#00d0ff" v-model="switchVal.value2"></mu-switch>
                                    </mu-col>
                                    <mu-col span="12" sm="12" md="12" lg="12" class="dd-mt-10" @click="light_three()">
                                        <span>照明3</span>
                                        <mu-switch class="switch_list" color="#00d0ff" v-model="switchVal.value3"></mu-switch>
                                    </mu-col>
                                </mu-row>
                            </mu-col>
                            <mu-col span="6" sm="6" md="6" lg="6">
                                <mu-row>
                                    <mu-col span="12" sm="12" md="12" lg="12" class="dd-mt-10" @click="light_four()">
                                        <span>照明4</span>
                                        <mu-switch class="switch_list" color="#00d0ff" v-model="switchVal.value11"></mu-switch>
                                    </mu-col>
                                    <mu-col span="12" sm="12" md="12" lg="12" class="dd-mt-10" @click="light_five()">
                                        <span>照明5</span>
                                        <mu-switch class="switch_list" color="#00d0ff" v-model="switchVal.value22"></mu-switch>
                                    </mu-col>
                                    <mu-col span="12" sm="12" md="12" lg="12" class="dd-mt-10" @click="light_six()">
                                        <span>照明6</span>
                                        <mu-switch class="switch_list" color="#00d0ff" v-model="switchVal.value33"></mu-switch>
                                    </mu-col>
                                </mu-row>
                            </mu-col>
                            <!--<mu-col span="4" sm="4" md="4" lg="4">
                                <mu-row>
                                    <mu-col span="12" sm="12" md="12" lg="12" class="dd-mt-10"  @click="curtain_one()">
                                        <span>窗帘1</span>
                                        <mu-switch class="switch_list" color="#00d0ff" v-model="switchVal.value4"></mu-switch>
                                    </mu-col>
                                    <mu-col span="12" sm="12" md="12" lg="12" class="dd-mt-10" @click="curtain_two()">
                                        <span>窗帘2</span>
                                        <mu-switch class="switch_list" color="#00d0ff" v-model="switchVal.value5"></mu-switch>
                                    </mu-col>
                                    <mu-col span="12" sm="12" md="12" lg="12" class="dd-mt-10">
                                        <span>窗帘2</span>
                                        <mu-switch class="switch_list" color="#00d0ff" v-model="switchVal.value6"></mu-switch>
                                    </mu-col>
                                </mu-row>
                            </mu-col>-->
                        </mu-row>
                    </mu-col>
                    <mu-col span="3" sm="3" md="4" lg="3" class="list_same air_cold">
                        <mu-row>
                            <mu-col span="3" sm="3" md="3" lg="3">
                                <a href="javascript:;" v-for="(item,index) in airname" :class="{active:index == num}" :id="item.id" @click="airstab(index)"  class="cold_name">{{item.name}}</a>
                            </mu-col>
                            <mu-col span="7" sm="7" md="7" lg="7" offset="2" v-for="(itemcon,index) in allair" v-show="index == num" class="numer_show">
                                <mu-row>
                                    <mu-col span="7" sm="7" md="7" lg="7" class="tem_number">
                                        <span>{{itemcon.tempnum}}</span><i>°C</i>
                                    </mu-col>
                                    <mu-col span="5" sm="5" md="5" lg="5" class="module_number">
                                        <mu-row class="iconbox" id="iconbox">
                                            <mu-col span="3" sm="3" md="3" lg="3" class="iconlist_a" :id="iconname.id" v-for="(iconname,iconindex) in itemcon.showicon" :class="{active:iconindex == iconnum}" @click="icontab(iconindex)">
                                                <svg class="icon" aria-hidden="true">
                                                    <use v-bind:xlink:href = iconname.icon></use>
                                                </svg>
                                            </mu-col>
                                        </mu-row>
                                        <mu-row class="dd-clearfix wind_speed">
                                            <mu-col span="6" sm="6" md="6" lg="6" class="wind_name">风速</mu-col>
                                            <mu-col span="1" sm="1" md="1" lg="1" class="wind_num active one_wind"></mu-col>
                                            <mu-col span="1" sm="1" md="1" lg="1" class="wind_num two_wind"></mu-col>
                                            <mu-col span="1" sm="1" md="1" lg="1" class="wind_num three_wind"></mu-col>    
                                        </mu-row>
                                    </mu-col>
                                </mu-row>
                            </mu-col>
                        </mu-row>
                        <!--<mu-row class="air_btn" v-for="(itemcon,index) in allair" v-show="index == num">
                            <mu-col span="2" sm="2" md="2" lg="2"  v-for="(listcon,listindex) in itemcon.air" :id="listcon.id" :class="{active:listindex == iconindex}"   @click="listtab(listindex)" class="air_btn_same">
                                <div class="btn_img">
                                    <svg class="icon" aria-hidden="true">
                                        <use v-bind:xlink:href = listcon.svg></use>
                                    </svg>
                                </div>
                                <span>{{listcon.font}}</span>
                            </mu-col>                            
                        </mu-row>-->
                        <mu-row class="air_btn" id="one_list">
                            <mu-col span="2" sm="2" md="2" lg="2" @click="opentab" class="air_btn_same" :class="{active:open1}">
                                <div class="btn_img">
                                    <svg class="icon" aria-hidden="true">
                                        <use xlink:href = "#icon-kaiguan"></use>
                                    </svg>
                                </div>
                                <span>开关</span>
                            </mu-col>
                            <mu-col span="2" sm="2" md="2" lg="2" @click="module1" class="air_btn_same" :class="{active:showstabel1 == 1}">
                                <div class="btn_img">
                                    <svg class="icon" aria-hidden="true">
                                        <use xlink:href = "#icon-iconfontmoshi"></use>
                                    </svg>
                                </div>
                                <span>模式</span>
                            </mu-col>
                            <mu-col span="2" sm="2" md="2" lg="2" @click="speend" class="air_btn_same" :class="{active:showstabel1 == 2}">
                                <div class="btn_img">
                                    <svg class="icon" aria-hidden="true">
                                        <use xlink:href = "#icon-caozuofengsufengnuan"></use>
                                    </svg>
                                </div>
                                <span>风速</span>
                            </mu-col>
                            <mu-col span="2" sm="2" md="2" lg="2" @click="add" class="air_btn_same" :class="{active:showstabel1 == 3}">
                                <div class="btn_img">
                                    <svg class="icon" aria-hidden="true">
                                        <use xlink:href = "#icon-icon10"></use>
                                    </svg>
                                </div>
                                <span>加</span>
                            </mu-col>
                            <mu-col span="2" sm="2" md="2" lg="2" @click="reduce" class="air_btn_same" :class="{active:showstabel1 == 4}">
                                <div class="btn_img">
                                    <svg class="icon" aria-hidden="true">
                                        <use xlink:href = "#icon-jian"></use>
                                    </svg>
                                </div>
                                <span>减</span>
                            </mu-col>
                        </mu-row>
                        <mu-row class="air_btn" id="two_list" style="display:none;">
                            <mu-col span="2" sm="2" md="2" lg="2" @click="opentab2" class="air_btn_same" :class="{active:open2}">
                                <div class="btn_img">
                                    <svg class="icon" aria-hidden="true">
                                        <use xlink:href = "#icon-kaiguan"></use>
                                    </svg>
                                </div>
                                <span>开关</span>
                            </mu-col>
                            <mu-col span="2" sm="2" md="2" lg="2" @click="module2" class="air_btn_same" :class="{active:showstabel2 == 1}">
                                <div class="btn_img">
                                    <svg class="icon" aria-hidden="true">
                                        <use xlink:href = "#icon-iconfontmoshi"></use>
                                    </svg>
                                </div>
                                <span>模式</span>
                            </mu-col>
                            <mu-col span="2" sm="2" md="2" lg="2" @click="speend2" class="air_btn_same" :class="{active:showstabel2 == 2}">
                                <div class="btn_img">
                                    <svg class="icon" aria-hidden="true">
                                        <use xlink:href = "#icon-caozuofengsufengnuan"></use>
                                    </svg>
                                </div>
                                <span>风速</span>
                            </mu-col>
                            <mu-col span="2" sm="2" md="2" lg="2" @click="add2" class="air_btn_same" :class="{active:showstabel2 == 3}">
                                <div class="btn_img">
                                    <svg class="icon" aria-hidden="true">
                                        <use xlink:href = "#icon-icon10"></use>
                                    </svg>
                                </div>
                                <span>加</span>
                            </mu-col>
                            <mu-col span="2" sm="2" md="2" lg="2" @click="reduce2" class="air_btn_same" :class="{active:showstabel2 == 4}">
                                <div class="btn_img">
                                    <svg class="icon" aria-hidden="true">
                                        <use xlink:href = "#icon-jian"></use>
                                    </svg>
                                </div>
                                <span>减</span>
                            </mu-col>
                        </mu-row>
                    </mu-col>
                    <mu-col span="3" sm="3" md="4" lg="3" class="list_same module_all">
                        <mu-row>
                            <mu-col span="6" sm="6" md="6" lg="6" class="same_module_m" @click="value7">
                                <span>办公模式</span>
                                <mu-switch class="switch_list" color="#00d0ff" v-model="switchVal.value7"></mu-switch>
                            </mu-col>
                            <mu-col span="6" sm="6" md="6" lg="6" class="same_module_m" @click="value8">
                                <span>会议模式</span>
                                <mu-switch class="switch_list" color="#00d0ff" v-model="switchVal.value8"></mu-switch>
                            </mu-col>
                            <mu-col span="6" sm="6" md="6" lg="6" class="same_module_m" @click="value9">
                                <span>演示模式</span>
                                <mu-switch class="switch_list" color="#00d0ff" v-model="switchVal.value9"></mu-switch>
                            </mu-col>
                            <mu-col span="6" sm="6" md="6" lg="6" class="same_module_m" @click="value10">
                                <span>空置模式</span>
                                <mu-switch class="switch_list" color="#00d0ff" v-model="switchVal.value10"></mu-switch>
                            </mu-col>
                        </mu-row>
                    </mu-col>
                </mu-row>
                <mu-row gutter>
                    <mu-col span="3" sm="3" md="4" lg="3" class="list_same info_show">
                        <mu-row>
                            <mu-col span="6" sm="6" md="6" lg="6" class="erery_info">
                                <svg class="icon" aria-hidden="true">
                                    <use xlink:href="#icon-iconset0480"></use>
                                </svg>
                                <span>室内温度</span>
                                <div class="number" span="8" sm="8" md="8" lg="8">
                                    <span>{{Math.floor(this.indexMessage.temp1)}}</span><i>°C</i>
                                </div>
                            </mu-col>
                            <mu-col  span="6" sm="6" md="6" lg="6"  class="erery_info">
                                <svg class="icon" aria-hidden="true">
                                    <use xlink:href="#icon-icon-humidity"></use>
                                </svg>
                                <span>室内湿度</span>
                                <div class="number" span="8" sm="8" md="8" lg="8">
                                    <span>{{Math.floor(this.indexMessage.humi1)}}</span><i>%RH</i>
                                </div>
                            </mu-col>
                            <mu-col  span="6" sm="6" md="6" lg="6"  class="erery_info">
                                <svg class="icon" aria-hidden="true">
                                    <use xlink:href="#icon-dengpao"></use>
                                </svg>
                                <span>室内照度</span>
                                <div class="number" span="8" sm="8" md="8" lg="8">
                                    <span>{{this.indexMessage.lux1}}</span><i>lx</i>
                                </div>
                            </mu-col>
                            <mu-col  span="6" sm="6" md="6" lg="6"  class="erery_info">
                                <svg class="icon" aria-hidden="true">
                                    <use xlink:href="#icon-fengche"></use>
                                </svg>
                                <span>PM2.5值</span>
                                <div class="number" span="8" sm="8" md="8" lg="8">
                                    <span>{{this.indexMessage.pm2p5_1}}</span><i>μg/m3</i>
                                </div>
                            </mu-col>
                        </mu-row>
                    </mu-col>
                    <mu-col span="3" sm="3" md="4" lg="3" class="list_same">
                        <mu-row>
                            <mu-col span="12" sm="12" md="12" lg="12" class="energy_info_show">
                                <mu-row class="dd-clearfix">
                                    <mu-col span="5" sm="5" md="5" lg="5" class="dd-fl energy_img">
                                        <svg class="icon" aria-hidden="true">
                                            <use xlink:href="#icon-dengpao"></use>
                                        </svg>
                                        <span>照明用电</span>
                                    </mu-col>
                                    <mu-col span="4" sm="4" md="4" lg="4" offset="3" class="energy_number dd-fr">
                                        <span>{{Math.floor(this.indexMessage.w_1)}}</span><i>W</i>
                                    </mu-col>
                                </mu-row>
                            </mu-col>
                            <mu-col span="12" sm="12" md="12" lg="12" class="energy_info_show">
                                <mu-row class="dd-clearfix">
                                    <mu-col span="5" sm="5" md="5" lg="5" class="dd-fl energy_img">
                                        <svg class="icon" aria-hidden="true">
                                            <use xlink:href="#icon-kongtiao"></use>
                                        </svg>
                                        <span>空调用电</span>
                                    </mu-col>
                                    <mu-col span="4" sm="4" md="4" lg="4" offset="3" class="energy_number dd-fr">
                                        <span>28</span><i>°C</i>
                                    </mu-col>
                                </mu-row>
                            </mu-col>
                            <mu-col span="12" sm="12" md="12" lg="12" class="energy_info_show">
                                <mu-row class="dd-clearfix">
                                    <mu-col span="5" sm="5" md="5" lg="5" class="dd-fl energy_img">
                                        <svg class="icon" aria-hidden="true">
                                            <use xlink:href="#icon-jiangshuiliang"></use>
                                        </svg>
                                        <span>水量统计</span>
                                    </mu-col>
                                    <mu-col span="4" sm="4" md="4" lg="4" offset="3" class="energy_number dd-fr">
                                        <span>28</span><i>°C</i>
                                    </mu-col>
                                </mu-row>
                            </mu-col>
                        </mu-row>
                    </mu-col>
                    <mu-col span="3" sm="3" md="4" lg="3" class="list_same">
                        <mu-row>
                            <mu-col span="12" sm="12" md="12" lg="12" class="energy_info_show">
                                <mu-row class="dd-clearfix">
                                    <mu-col span="5" sm="5" md="5" lg="5" class="dd-fl energy_img">
                                        <svg class="icon" aria-hidden="true">
                                            <use xlink:href="#icon-zuoyebaojing"></use>
                                        </svg>
                                        <span>告警数量</span>
                                    </mu-col>
                                    <mu-col span="4" sm="4" md="4" lg="4" offset="3" class="energy_number dd-fr">
                                        <span>28</span>
                                    </mu-col>
                                </mu-row>
                            </mu-col>
                            <mu-col span="12" sm="12" md="12" lg="12" class="energy_info_show">
                                <mu-row class="dd-clearfix">
                                    <mu-col span="5" sm="5" md="5" lg="5" class="dd-fl energy_img">
                                        <svg class="icon" aria-hidden="true">
                                            <use xlink:href="#icon-yichuligaojing"></use>
                                        </svg>
                                        <span>已处理</span>
                                    </mu-col>
                                    <mu-col span="4" sm="4" md="4" lg="4" offset="3" class="energy_number dd-fr">
                                        <span>28</span>
                                    </mu-col>
                                </mu-row>
                            </mu-col>
                            <mu-col span="12" sm="12" md="12" lg="12" class="energy_info_show">
                                <mu-row class="dd-clearfix">
                                    <mu-col span="5" sm="5" md="5" lg="5" class="dd-fl energy_img">
                                        <svg class="icon" aria-hidden="true">
                                            <use xlink:href="#icon-weichuligaojing"></use>
                                        </svg>
                                        <span>未处理</span>
                                    </mu-col>
                                    <mu-col span="4" sm="4" md="4" lg="4" offset="3" class="energy_number dd-fr">
                                        <span>28</span>
                                    </mu-col>
                                </mu-row>
                            </mu-col>
                        </mu-row>
                    </mu-col>
                </mu-row>
            </mu-container>
        </div>
        <div class="footer">
            <mu-container class="index_middile_con" fluid>
                <mu-row gutter>
                    <mu-col span="10" sm="10" md="10" lg="10" offset="1" class="footer_message">
                        <svg class="icon" aria-hidden="true">
                            <use xlink:href="#icon-laba"></use>
                        </svg>
                        <div class="msg_box" id="msg_box">
                            <ul class="msg_list" id="msg_list">
                                <li>12:00，1月份工作总结</li>
                                <li>13:00，1月份工作总结</li>
                                <li>14:00，1月份工作总结</li>
                                <li>15:00，1月份工作总结</li>
                                <li>16:00，1月份工作总结</li>
                            </ul>
                        </div>
                    </mu-col>
                </mu-row>
            </mu-container>
        </div>
    </div>
</template>

<script>
import axios from 'axios'
export default {
    data () {
        return {
            switchVal: {
                value1: true,
                value2: false,
                value3: false,
                value11: true,
                value22: false,
                value33: false,
                value4: false,
                value5: false,
                value6: false,
                value7: true,
                value8: false,
                value9: false,
                value10: false
            },
            num:0,
            showstabel1:'',
            showstabel2:'',
            iconindex:1,
            open1:false,
            open2:false,
            airnum:1,
            iconnum:0,
            indexMessage:'',
            airname:[
                {id:'tab1',name:'空调1'},
                {id:'tab2',name:'空调2'}
            ],
            allair:[
                {
                    tempnum:17,
                    showicon:[
                        {
                            id:'one',
                            icon:'#icon-icon15'
                        },
                        {
                            id:'two',
                            icon:'#icon-ai250'
                        },
                        {
                            id:'three',
                            icon:'#icon-shuidi2'
                        },
                    ]                    
                },
                {
                    tempnum:17,
                    showicon:[
                        {
                            id:'four',
                            icon:'#icon-icon15'
                        },
                        {
                            id:'five',
                            icon:'#icon-ai250'
                        },
                        {
                            id:'six',
                            icon:'#icon-shuidi2'
                        },
                    ]                   
                }
            ]
        }
    },
    created(){
        this.timer = setInterval(()=>{
            axios.get("http://182.92.1.168:9090/data")
            .then((reg) => {                          
                this.indexMessage = reg.data.data.Data                                                                             
            })
            .catch(function (err) {
                console.log(err);
            }); 
        },5000)
    },
    mounted () {
        this.message();
        this.getInfo();
    },
    methods: {
        light_one() {
            if(this.switchVal.value1 == true){
                $.get("http://192.168.0.104:9090/api?mod=control&device=light&id=1&cmd=on",function(){
                    //console.log(1)
                })
            }else{
                $.get("http://192.168.0.104:9090/api?mod=control&device=light&id=1&cmd=off",function(){
                    //console.log(2)
                })
            }
        },
        light_two() {
            if(this.switchVal.value2 == true){
                $.get("http://192.168.0.104:9090/api?mod=control&device=light&id=2&cmd=on",function(){
                    //console.log(1)
                })
            }else{
                $.get("http://192.168.0.104:9090/api?mod=control&device=light&id=2&cmd=off",function(){
                    //console.log(2)
                })
            }
        },
        light_three() {
            if(this.switchVal.value3 == true){
                $.get(" http://192.168.0.104:9090/api?mod=control&device=light&id=3&cmd=on",function(){
                    //console.log(1)
                })
            }else{
                $.get("http://192.168.0.104:9090/api?mod=control&device=light&id=3&cmd=off",function(){
                    //console.log(2)
                })
            }
        },
        light_four() {
            if(this.switchVal.value11 == true){
                $.get("http://192.168.0.104:9090/api?mod=control&device=light&id=4&cmd=on",function(){
                    //console.log(1)
                })
            }else{
                $.get("http://192.168.0.104:9090/api?mod=control&device=light&id=4&cmd=off",function(){
                    //console.log(2)
                })
            }
        },
        light_five() {
            if(this.switchVal.value22 == true){
                $.get("http://192.168.0.104:9090/api?mod=control&device=light&id=5&cmd=on",function(){
                    //console.log(1)
                })
            }else{
                $.get("http://192.168.0.104:9090/api?mod=control&device=light&id=5&cmd=off",function(){
                    //console.log(2)
                })
            }
        },
        light_six() {
            if(this.switchVal.value33 == true){
                $.get("http://192.168.0.104:9090/api?mod=control&device=light&id=6&cmd=on",function(){
                    //console.log(1)
                })
            }else{
                $.get("http://192.168.0.104:9090/api?mod=control&device=light&id=6&cmd=off",function(){
                    //console.log(2)
                })
            }
        },
        getInfo() {
            axios.get("http://182.92.1.168:9090/data").then((reg)=>{
                /*console.log(reg.data.data.Data)*/
                this.indexMessage = reg.data.data.Data
            })
        },
        message(){
            this.$nextTick(function(){
                clearInterval(timer);
                var showBox = document.getElementById("msg_box"),
                    timer = null;
                    clearInterval(timer);
                    timer = setInterval("noticeUp('.msg_box ul','-20px',500)",2000);
                    showBox.onmouseover = function(){
                        clearInterval(timer)
                    }   
                    showBox.onmouseout = function(){
                        timer = setInterval("noticeUp('.msg_box ul','-20px',500)",2000)
                    }
            })
        },
        value7() {
            if(this.switchVal.value7 == true){
                this.switchVal.value8 = false;
                this.switchVal.value9 = false;
                this.switchVal.value10 = false;
            }
        },
        value8() {
            if(this.switchVal.value8 == true){
                this.switchVal.value7 = false;
                this.switchVal.value9 = false;
                this.switchVal.value10 = false;
            }
        },
        value9() {
            if(this.switchVal.value9 == true){
                this.switchVal.value7 = false;
                this.switchVal.value8 = false;
                this.switchVal.value10 = false;
            }
        },
        value10() {
            if(this.switchVal.value10 == true){
                this.switchVal.value7 = false;
                this.switchVal.value8 = false;
                this.switchVal.value9 = false;
            }
        },
        airstab(index) {
            this.num = index;
            $('#tab1').click(function(){
               $("#one_list").show();
               $("#two_list").hide();
            })
            $('#tab2').click(function(){
               $("#two_list").show();
               $("#one_list").hide();
            })
        },
        icontab(iconindex) {
            this.iconnum = iconindex;
        },
        listtab(listindex) {
            this.iconindex = listindex;
        },
        opentab() {
            this.open1 = !this.open1;
        },
        opentab2() {
            this.open2 = !this.open2;
        },
        module1() {
            this.showstabel1 = 1;
            var maxIndex=2;
            if(this.iconnum < maxIndex){
                this.iconnum++;
            }else {
                this.iconnum = 0;
            }
        },
        module2() {
            this.showstabel2 = 1;
            var maxIndex=2;
            if(this.iconnum < maxIndex){
                this.iconnum++;
            }else {
                this.iconnum = 0;
            }
        },
        speend() {
            this.showstabel1 = 2;
            if($('.one_wind').next().next().hasClass("active")){
                $('.one_wind').addClass("active").siblings().removeClass("active");
                return;
            }
            if($('.one_wind').next().hasClass("active")){
                $('.one_wind').next().next().addClass("active");
                return;
            }else{
                $('.one_wind').next().addClass("active");
                return;
            }
        },
        speend2() {
            this.showstabel2 = 2;
            if($('.one_wind').next().next().hasClass("active")){
                $('.one_wind').addClass("active").siblings().removeClass("active");
                return;
            }
            if($('.one_wind').next().hasClass("active")){
                $('.one_wind').next().next().addClass("active");
                return;
            }else{
                $('.one_wind').next().addClass("active");
                return;
            }
        },
        add() {
            this.showstabel1 = 3;
            if(this.allair[0].tempnum == 30) {
                this.allair[0].tempnum = 30
            }else {
                this.allair[0].tempnum += 1
            }
        },
        add2() {
            this.showstabel2 = 3;
            if(this.allair[1].tempnum == 30) {
                this.allair[1].tempnum = 30
            }else {
                this.allair[1].tempnum += 1
            }
        },
        reduce() {
            this.showstabel1 = 4;
            if(this.allair[0].tempnum == 17) {
                this.allair[0].tempnum = 17
            }else {
                this.allair[0].tempnum -= 1
            }
        },
        reduce2() {
            this.showstabel2 = 4;
            if(this.allair[1].tempnum == 17) {
                this.allair[1].tempnum = 17
            }else {
                this.allair[1].tempnum -= 1
            }
        },        
    }
}
</script>

<style lang="scss">
//主题
 @import '~@/assets/style/theme/default.scss';
//样式
 @import '~@/assets/style/style.scss';
</style>

